<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=utf-8"
		 isELIgnored="false"%>
<%@ include file="/common/include/taglib.jsp"%>
<html>
<head>
	<meta charset="utf-8">
	<title>Basic Custom Example</title>
	<!-- Bootstrap -->
	<link href="../resource/twitter-bootstrap-wizard/bootstrap/css/bootstrap.min.css" rel="stylesheet">
	<!-- custom styles -->
	<link href="../resource/twitter-bootstrap-wizard/examples/custom.css" rel="stylesheet">
	<link href="../resource/twitter-bootstrap-wizard/prettify.css" rel="stylesheet">

	<link type="text/css" href="../resource/jquery-ui-bootstrap-v0.5pre/css/custom-theme/jquery-ui-1.10.0.custom.css" rel="stylesheet" />
	<link type="text/css" href="../resource/jquery-ui-bootstrap-v0.5pre/assets/css/font-awesome.min.css" rel="stylesheet" />
	<!--[if IE 7]>
	<link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css">
	<![endif]-->
	<!--[if lt IE 9]>
	<link rel="stylesheet" type="text/css" href="css/custom-theme/jquery.ui.1.10.0.ie.css"/>
	<![endif]-->
	<link href="../resource/jquery-ui-bootstrap-v0.5pre/assets/css/docs.css" rel="stylesheet">
	<link href="../resource/jquery-ui-bootstrap-v0.5pre/assets/js/google-code-prettify/prettify.css" rel="stylesheet">
	<script language="javascript" type="text/javascript" src="../resource/My97DatePicker/WdatePicker.js"></script>

</head>
<body>
<div class='container'>
	<div class="span12">
		<section id="wizard">
			<div id="rootwizard">
				<ul>
					<li><a href="#tab1" data-toggle="tab"><span class="label">1</span> 工作任务填写</a></li>
					<li><a href="#tab2" data-toggle="tab"><span class="label">2</span> 问题</a></li>
				</ul>
				<hr>
				<form class="form-horizontal" id="formid">
					<input type="hidden" name="loginuserid" id="loginuserid" value="10000001"/>
					<div class="tab-content">
						<div class="tab-pane" id="tab1">
							<br>
							<div class="span11">
								<div class="span4">
									<div class="control-group">
										<label class="control-label" for="inputCASEName">CASEName</label>
										<div class="controls">
											<input type="text" id="inputCASEName" name="casename"
												   placeholder="case1" >
										</div>
									</div>
									<div class="control-group">
										<label class="control-label" for="inputFileSize">文件大小</label>
										<div class="controls">
											<input type="text" id="inputFileSize" name="fileSize"
												   placeholder="1" class="span1"> G
										</div>
									</div>
									<div class="control-group">
										<label class="control-label" for="inputFileNum">文件个数</label>
										<div class="controls">
											<input type="text" id="inputFileNum" class="span1" name="fileNum"
												   placeholder="3409">
										</div>
									</div>
									<div class="control-group">
										<label class="control-label" for="inputSerialNO">序列号</label>
										<div class="controls">
											<input type="text" id="inputSerialNO" class="span3" name="serialNO"
												   placeholder="123456">
										</div>
									</div>
								</div>
								<div class="span6">
									<div class="control-group">
										<label class="control-label">优先级</label>
										<div class="controls">
											<div id="radiosetPriority">
												<input type="radio" id="priorityradio1" name="priority" value="1" checked="checked"/><label for="priorityradio1">优先</label>
												<input type="radio" id="priorityradio2" name="priority" value="2"/><label for="priorityradio2">中</label>
												<input type="radio" id="priorityradio3" name="priority" value="3"/><label for="priorityradio3">一般</label>
											</div>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label">工作类型</label>
										<div class="controls">
											<div id="radiosetWorkType">
												<input type="radio" id="wortTypeRadio1" name="workType" value="1" checked="checked"/><label for="wortTypeRadio1">Nuix</label>
												<input type="radio" id="wortTypeRadio2" name="workType" value="2"/><label for="wortTypeRadio2">LAW</label>
												<input type="radio" id="wortTypeRadio3" name="workType" value="3"/><label for="wortTypeRadio3">DEL</label>
												<input type="radio" id="wortTypeRadio4" name="workType" value="4"/><label for="wortTypeRadio4">Rel</label>
											</div>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label">难易程度</label>
										<div class="controls">
											<div id="radioset">
												<input type="radio" id="radio1" name="degree" value="1" checked="checked"/><label for="radio1">易</label>
												<input type="radio" id="radio2" name="degree" value="2"/><label for="radio2">中</label>
												<input type="radio" id="radio3" name="degree" value="3"/><label for="radio3">难</label>
											</div>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label">分配给</label>
										<div class="controls">
											<select id="selectuserid" name="userid">
											</select>
										</div>
									</div>

								</div>
							</div>
						</div>
						<div class="tab-pane" id="tab2">
							<div class="span11"></div>
						</div>
						<div class="span11">
							<ul class="pager wizard">
								<li class="previous first" style="display:none;"><a href="#">First</a></li>
								<a class="button ui-button-success" onclick="submitform()">提交</a>
								<li class="next last" style="display:none;"><a href="#">Last</a></li>
							</ul>
						</div>
					</div>
				</form>
			</div>
		</section>
	</div>
</div>


<script src="../resource/jquery-ui-bootstrap-v0.5pre/js/jquery-1.8.3.min.js"></script>
<script src="../resource/twitter-bootstrap-wizard/bootstrap/js/bootstrap.min.js"></script>
<script src="../resource/twitter-bootstrap-wizard/jquery.bootstrap.wizard.js"></script>
<script src="../resource/twitter-bootstrap-wizard/prettify.js"></script>
<script>
	/**
	 * 人员选择框
	 */
	function initSelectUser(){
		$.ajax({
			method: "POST",
			url: "../user.do?reqCode=queryAllUsersForManageIRIS",
			data:{loginuserid:parent.userid,
				deptid : '001001'},
			datatype: "json",
			success:function(data) {
				var obj = eval ("(" + data + ")");

				console.info("11"+data);
				console.info(obj.ROOT[0].username);
				for(var i=0;i<obj.ROOT.length;i++){
					$("#selectuserid").append("<option value='"+obj.ROOT[i].userid+"'>" + obj.ROOT[i].username + "</option>");
				}
			}
		})
	}

	$(document).ready(function() {
		$('#rootwizard').bootstrapWizard({'tabClass': 'bwizard-steps'});
		window.prettyPrint && prettyPrint();
		$('#preview').click(function () {
			$('#dialog-message').dialog('open');
			return false;
		});
		initSelectUser();
	});

	//提交表单
	function submitform()
	{
		$("#loginuserid").val(parent.userid);
		$("#formid").ajaxSubmit({
			type: "post",
			url: './test.do?reqCode=saveWTRTask',
			dataType: 'json',
			success: function(result){
				alert('提交任务单成功');
			},
			error: function(){
				alert('Error');
			}
		});
	}
</script>

<script src="../resource/jquery-ui-bootstrap-v0.5pre/assets/js/jquery-ui-1.10.0.custom.min.js" type="text/javascript"></script>
<script src="../resource/jquery-ui-bootstrap-v0.5pre/assets/js/google-code-prettify/prettify.js" type="text/javascript"></script>
<script src="../resource/jquery/jquery.form.js"></script>
<script src="../resource/jquery-ui-bootstrap-v0.5pre/assets/js/docs.js" type="text/javascript"></script>
<script src="test/js/addWTRTask.js" type="text/javascript"></script>
</body>
</html>
